Feature: Check items available to add to shopping cart
Description: As user I want to check if I could add to shopping cart any searched item.
File name: amazon_test.feature
Relative path: features/amazon_test.feature
Scenario Outline: Perform a seach for iPhone 14 PRO and add it to the shopping cart
Before
Hook
00:00:00.007
Then
I click on search button
00:00:02.992
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //*[contains (text(),'Added to Cart')] (tried for 5 second(s) with 100 milliseconds interval) Build info: version: '4.8.1', revision: '8ebccac989' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '20.0.1' Driver info: driver.version: unknown at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:263) at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:231) at actions.BrowserActions.fluentWait(BrowserActions.java:32) at stepdefinitions.Tests.seeTheConfirmationMessage(Tests.java:104) at ✽.I see the confirmation message(file:///C:/Users/pgiron/Desktop/Side%20Project/Automation_Portfolio/Web_Automation/Selenium_Projects/verify_items/src/test/java/features/amazon_test.feature:16)
Then
I see the cart items count is "1"
0s
Scenario Outline: Perform a seach for QA Automation book and add it to the shopping cart
Before
Hook
0s
org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: chrome=114.0.5735.110)
Build info: version: '4.8.1', revision: '8ebccac989'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '20.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [72bd29ba9dd0d87e65c76ec52c3e55de, sendKeysToElement {id=B6793437149F7009D6BAC1232D12DCF0_element_173, value=[Ljava.lang.CharSequence;@3291b443}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 114.0.5735.110, chrome: {chromedriverVersion: 114.0.5735.90 (386bc09e8f4f..., userDataDir: C:\Users\pgiron\AppData\Loc...}, goog:chromeOptions: {debuggerAddress: localhost:51768}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:51768/devtoo..., se:cdpVersion: 114.0.5735.110, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Element: [[ChromeDriver: chrome on WINDOWS (72bd29ba9dd0d87e65c76ec52c3e55de)] -) id: twotabsearchtextbox]
Session ID: 72bd29ba9dd0d87e65c76ec52c3e55de
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:184)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:167)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:257)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:113)
at actions.BrowserActions.type(BrowserActions.java:44)
at stepdefinitions.Tests.typeTheSearchedItem(Tests.java:47)
at ✽.I type "QA Automation book"(file:///C:/Users/pgiron/Desktop/Side%20Project/Automation_Portfolio/Web_Automation/Selenium_Projects/verify_items/src/test/java/features/amazon_test.feature:8)
Then
I click on search button
0s
Given
I see the results list for "QA Automation book"
0s
When
I navigate to page "1"
0s
Then
I select the item 2
0s
Given
I see the description and add the item to shopping cart
0s
When
I see the confirmation message
0s
Then
I see the cart items count is "2"
0s